package com.spring;

import com.sun.istack.internal.Nullable;

/**
 * @author yanbing
 * @version 1.0
 * @date 2021/9/5 9:40
 */
public interface BeanPostProcessor {

    /**
     * 初始化前执行
     * @param bean
     * @param beanName
     * @return
     * @throws
     */
    @Nullable
    default Object postProcessBeforeInitialization(Object bean, String beanName)   {
        return bean;
    }

    /**
     * 初始化后执行
     * @param bean
     * @param beanName
     * @return
     * @throws
     */
    @Nullable
    default Object postProcessAfterInitialization(Object bean, String beanName)   {
        return bean;
    }
}
